all:
	bison -d newportal.y -v
	mv newportal.tab.h portal.h
	mv newportal.tab.c portal.y.c
	flex portal.l
	gcc -g -c syntaxTree.c -o syntaxTree.y -w
	gcc -g -c symbolTable.c -o symbolTable.y -w
	gcc -g -c typecheck_visitor.c -o typecheck_visitor.y -w
	gcc -g -c codegen_visitor.c -o codegen_visitor.y
	gcc -g -c lex.yy.c -o as -w
	gcc -g -c main.c -o as.y -w
	gcc -g -o parser as as.y syntaxTree.y symbolTable.y typecheck_visitor.y codegen_visitor.y -w



run:
	./parser olaportal.portal

clean:
	rm as.y as parser lex.yy.c portal.y.c portal.h
